<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> 固定偏移 </title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }

        body{
            padding-top: 100px;
        }

        .top{
            width: 100%;
            height: 100px;
            background-color: red;
            position: fixed;
            left: 0;
            top: 0;
        }

        .bottom{
            width: 100%;
            height: 100px;
            background-color: red;
            position: fixed;
            left: 0;
            bottom: 0;
        }

        .left{
            position: fixed;
            left: 0;
            top: 0;
            background-color: red;
            width: 200px;
            height: 100%;
        }

        h1{
            height: 1000px;
        }
    </style>
</head>
<body>
    <div class="left"> 导航条 </div>
    <h1>内容区域</h1>
</body>
</html>